<html>
<head>
<title>House Finder</title>
<style type="text/css">
    body
    {
    	font-family:Tahoma;
    	font-size:0.8em;
    }
    
    h1
    {
    	font-size:1.1em;
    	margin:0 0 13px 0;
    	text-transform:uppercase;
    }
    
    .label
    {
    	float:left;
    	width:200px;
    	padding:3px 3px 0 0;
    }
    
    .input
    {
    	float:left;
    	width:200px;
    	padding:3px 3px 0 0;
    }
    
    .separator
    {
    	clear:both;
    }
</style>

<script type="text/javascript">
    function calculate() {
        var incomeTxt = document.getElementById('income').value;
        var roomTxt = document.getElementById('room').value;

        if (incomeTxt != "" && roomTxt != "") {
            incomeYear = 12 * incomeTxt;
            housePrice = roomTxt * 5000;

            if (incomeYear > housePrice) {
                alert('Congrats, for your new house.');
            }
            else {
                alert('Please decrease your room.');
            }
        }
        else {
            alert('Please complete your data');
        }
    }
</script>
</head>
<body>
    <h1>Ready to find a new house ?</h1>
    
    <div class="label">Enter your annual income :</div>
    <div class="input"><input type="text" id="income" /></div>
    
    <div class="separator"></div>
    
    <div class="label">Enter the number of bedrooms :</div>
    <div class="input"><input type="text" id="room" /></div>
    
    <div class="separator"></div>
    
    <div><input type="button" id="btn" value="Calculate Price" onclick="calculate()" /></div>
</body>
</html>